package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 电子邮件发送记录对象 sys_send_mail_log
 *
 * @author athena
 * @date 2024-05-16
 */
public class SysEmailRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 用户ID */
    private Long userId;

    /** 发送方邮件 */
    @Excel(name = "发送方邮件")
    private String fromMail;

    /** 接收方邮件 */
    @Excel(name = "接收方邮件")
    private String toMail;

    /** 抄送方邮件 */
    @Excel(name = "抄送方邮件")
    private String ccMail;

    /** 密送方邮件 */
    @Excel(name = "密送方邮件")
    private String bccMail;

    /** 主题 */
    @Excel(name = "主题")
    private String subject;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 内嵌数组 */
    private String imgArray;

    /** 附件数组 */
    @Excel(name = "附件数组")
    private String fileArray;
    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sendDate;

    /** 邮件了类型：0-发送，1-接收，2-转发 */
    @Excel(name = "邮件了类型", readConverterExp="0=发送，1=接收，2=转发")
    private Integer type;

    /** 发送时间：0-成功，1-失败 */
    @Excel(name = "是否成功", readConverterExp="0=成功，1=失败")
    private Integer status;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setFromMail(String fromMail)
    {
        this.fromMail = fromMail;
    }

    public String getFromMail()
    {
        return fromMail;
    }
    public void setToMail(String toMail)
    {
        this.toMail = toMail;
    }

    public String getToMail()
    {
        return toMail;
    }
    public void setCcMail(String ccMail)
    {
        this.ccMail = ccMail;
    }

    public String getCcMail()
    {
        return ccMail;
    }
    public void setBccMail(String bccMail)
    {
        this.bccMail = bccMail;
    }

    public String getBccMail()
    {
        return bccMail;
    }
    public void setSubject(String subject)
    {
        this.subject = subject;
    }

    public String getSubject()
    {
        return subject;
    }
    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }
    public void setImgArray(String imgArray)
    {
        this.imgArray = imgArray;
    }

    public String getImgArray()
    {
        return imgArray;
    }
    public void setFileArray(String fileArray)
    {
        this.fileArray = fileArray;
    }

    public String getFileArray()
    {
        return fileArray;
    }

    public Date getSendDate() {
        return sendDate;
    }

    public void setSendDate(Date sendDate) {
        this.sendDate = sendDate;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public SysEmailRecord() {
    }

    public SysEmailRecord(String fromMail, String toMail, String subject, String content) {
        this.fromMail = fromMail;
        this.toMail = toMail;
        this.subject = subject;
        this.content = content;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("fromMail", getFromMail())
            .append("toMail", getToMail())
            .append("ccMail", getCcMail())
            .append("bccMail", getBccMail())
            .append("subject", getSubject())
            .append("content", getContent())
            .append("imgArray", getImgArray())
            .append("fileArray", getFileArray())
            .append("sendDate", getSendDate())
            .append("type", getType())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
